package sym0920;

import java.util.Scanner;

public class J02MyAgea {

	public static void main(String[] args) {
		
		//변수선언
		int birthYear;
		int currentYear;
		int age;
		
		Scanner sc = null;
		
		//생년입력, 나이 계산
		sc = new Scanner(System.in);
		System.out.println("생년을 입력하세요 ");
		birthYear = sc.nextInt();
		System.out.println("현재년도를 입력하세요 ");
		currentYear=sc.nextInt();
		
		age=currentYear-birthYear+1;
		
		//결과출력
		System.out.println("생년: "+birthYear);
		System.out.println("현재년도: "+currentYear);
		System.out.println("나이: "+age);
		
		sc.close();
				
	}

}
